Add mag_cleanse() to route-point output.
authoralexmot <alexmot@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 3 Dec 2003 18:39:13 +0000 (18:39 +0000)
committeralexmot <alexmot@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 3 Dec 2003 18:39:13 +0000 (18:39 +0000)
gpsbabel/magproto.c

index 07d4cdea63d078fc70d95b0afcbfd9d256c908a6..e8d040ba664189e71c1be6fb8c676677817bfdca 100644 (file)
@@ -1269,7 +1269,7 @@ mag_route_trl(const route_head * rte)
        waypoint *waypointp;
        char obuff[256];
        char buff1[64], buff2[64];
-       char *pbuff;
+       char *pbuff, *owpt;
        const char * icon_token;
        int i, numlines, thisline;
        
@@ -1297,7 +1297,12 @@ mag_route_trl(const route_head * rte)
                else
                        pbuff = buff2;
 
-               sprintf(pbuff, "%s,%s", waypointp->shortname, icon_token);
+               owpt = waypointp->shortname;
+               owpt = mag_cleanse(owpt);
+
+               sprintf(pbuff, "%s,%s", owpt, icon_token);
+               
+               xfree(owpt);
                
                if ((tmp == &rte->waypoint_list) || ((i % 2) == 0)) {
                        thisline++;